package com.bargate.domain.spring.expression.value;

import org.springframework.beans.factory.annotation.Value;

/**
 * Created by IntelliJ IDEA.
 * User: EAD-MASTER
 * Date: 18/09/2010
 * Time: 22:20:40
 * To change this template use File | Settings | File Templates.
 */
public class ArithmeticOperations {

//    @Value("#{5.0d % 3.1d}")
    @Value("#{5.0d ^ 3.1d}")
    private Double tryADouble;

    public Double getTryADouble() {
        return tryADouble;
    }
    //    @Value("#{33.02d - 5.0d}")
    @Value("#{33.02f - 5.0f}")
    private Float tryAFloat;

    public Float getTryAFloat() {
        return tryAFloat;
    }

    @Value("#{3 * 42 + 4.5 * 3.1 + 17 / 2}")
    private Double tryAComplexDouble;

    public Double getTryAComplexDouble() {
        return tryAComplexDouble;
    }

    @Value("#{12 * 2 + 5.5 * 3 + 9 / 2}") /* spring will auto convert the result to double */
    private Double tryAComplexDouble2;

    public Double getTryAComplexDouble2() {
        return tryAComplexDouble2;
    }

    @Value("#{12 * 2 + 5.5 * 3 + 9 / 2}") /* spring will auto convert the result to integer */
    private Integer tryAComplexIntegerAutoConverted;

    public Integer getTryAComplexIntegerAutoConverted() {
        return tryAComplexIntegerAutoConverted;
    }
}
